//
//  FindPWDView.m
//  BasketballClub
//
//  Created by 孙鸿吉 on 16/1/15.
//  Copyright © 2016年 孙鸿吉. All rights reserved.
//

#import "FindPWDView.h"

@implementation FindPWDView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self allViews];
    }
    return self;
}
- (void)allViews
{
    //标题
    self.title = [[UILabel alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/2 - (40 * LAYOUT_SIZE), 29 * LAYOUT_SIZE_HEIGHT, 80* LAYOUT_SIZE, 26 * LAYOUT_SIZE_HEIGHT)];
    self.title.text = @"找回密码";
    self.title.textAlignment = 1;
    self.title.textColor = [UIColor yellowColor];
    self.title.font = [UIFont systemFontOfSize:17 * LAYOUT_SIZE];
    [self addSubview:self.title];
    //取消按钮
    self.cancleButton = [[UIButton alloc]initWithFrame:CGRectMake(10 * LAYOUT_SIZE, 29 * LAYOUT_SIZE_HEIGHT, 50 * LAYOUT_SIZE, 26 * LAYOUT_SIZE_HEIGHT)];
    [self.cancleButton setImage:[UIImage imageNamed:@"fanhui"] forState:UIControlStateNormal];
    [self addSubview:self.cancleButton];
    
    self.emailHeadImageView = [[UIImageView alloc]initWithFrame:CGRectMake(50 * LAYOUT_SIZE, 150 * LAYOUT_SIZE_HEIGHT, 30 * LAYOUT_SIZE, 30 * LAYOUT_SIZE_HEIGHT)];
    self.emailHeadImageView.image = [UIImage imageNamed:@"phoneNumberBackGround@2x"];
    [self addSubview:self.emailHeadImageView];
    //邮箱
    self.emailFootImageView = [[UIImageView alloc]initWithFrame:CGRectMake(85 * LAYOUT_SIZE, 150 * LAYOUT_SIZE_HEIGHT, SCREEN_WIDTH - 135 * LAYOUT_SIZE, 30 * LAYOUT_SIZE_HEIGHT)];
    self.emailFootImageView.image = [UIImage imageNamed:@"phoneNumberBackGroundInput@2x"];
    [self addSubview:self.emailFootImageView];
    
    self.emailImageView = [[UIImageView alloc]initWithFrame:CGRectMake(55 * LAYOUT_SIZE, 155 * LAYOUT_SIZE_HEIGHT, 20 * LAYOUT_SIZE, 20 * LAYOUT_SIZE_HEIGHT)];
    self.emailImageView.image = [UIImage imageNamed:@"iconfont-youxiang"];
    [self addSubview:self.emailImageView];
    
    self.emailTF = [[UITextField alloc]initWithFrame:CGRectMake(90 * LAYOUT_SIZE, 150 * LAYOUT_SIZE_HEIGHT, SCREEN_WIDTH - 145 * LAYOUT_SIZE, 30 * LAYOUT_SIZE_HEIGHT)];
    self.emailTF.placeholder = @"通过邮箱找回密码";
    [self.emailTF setValue:[UIFont boldSystemFontOfSize:16 * LAYOUT_SIZE] forKeyPath:@"_placeholderLabel.font"];
    self.emailTF.clearButtonMode = 3;
    [self.emailTF setValue:ColorHexA(0xFFFFE0, 0.7) forKeyPath:@"_placeholderLabel.textColor"];
    [self addSubview:self.emailTF];
    //发送邮件按钮
    self.sendEmailButton = [[UIButton alloc]initWithFrame:CGRectMake(50 * LAYOUT_SIZE, 250 * LAYOUT_SIZE_HEIGHT, 314 * LAYOUT_SIZE, 30 * LAYOUT_SIZE_HEIGHT)];
    [self.sendEmailButton setTitle:@"发送邮件" forState:UIControlStateNormal];
    self.sendEmailButton.backgroundColor = ColorHex(0x90EE90);
    self.sendEmailButton.layer.masksToBounds = YES;
    self.sendEmailButton.layer.cornerRadius = 8;
    [self addSubview:self.sendEmailButton];
    //logo
    self.logoImageView = [[UIImageView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH - 220*LAYOUT_SIZE)/2, 500 * LAYOUT_SIZE_HEIGHT, 220 * LAYOUT_SIZE, 25 * LAYOUT_SIZE_HEIGHT)];
    self.logoImageView.image = [UIImage imageNamed:@"logo1"];
    [self addSubview:self.logoImageView];

}
@end
